<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\UserController;
use App\Http\Controllers\GameController;

/**
 * 用户管理
 */
Route::get('/user/find/{id}', [UserController::class, 'getUserById']);
Route::get('/user/mobile/{mobile}', [UserController::class, 'getUserByMobile']);
Route::post('/user/register', [UserController::class, 'registerUser']);
Route::get('/user/search', [UserController::class, 'searchUsers']);
Route::delete('/user/delete/{id}', [UserController::class, 'deleteUser']);

/**
 * 游戏设置
 */
Route::get('/game/get/{id}', [GameController::class, 'show'])->name('game.show');
Route::get('/game/listByUserIdAndCodes/{userId}', [GameController::class, 'listByUserIdAndCodes'])->name('game.listByUserIdAndCodes');
Route::delete('/game/delete/{id}', [GameController::class, 'destroy'])->name('game.destroy');
Route::put('/game/update/{id}', [GameController::class, 'update'])->name('game.update');
Route::get('/game/create', [GameController::class, 'create'])->name('game.create');
